/*
 *   Copyright 2021 zzh
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 *
 */

package com.aduib.boot.common.SPI.metadata;

import java.lang.annotation.Annotation;
import java.lang.reflect.AccessibleObject;

/**
 * @description: MetaData
 * @author: zzh
 * @date: 2021/11/1 09:53
 */
public interface MetaData {

    default Annotation[] getAnnotations() {
        return new Annotation[0];
    }

    <A extends Annotation> A getAnnotation(Class<A> clazz);
    /**
     * 返回可访问对象，可能是构造器，属性，方法
     * @return
     */
    AccessibleObject getAccessibleObject();

    /**
     * 返回名称，可能是构造器名，属性名，方法名
     * @return
     */
    String getSimpleName();

    /**
     * 返回访问修饰符
     * @return
     */
    int getModifiers();
}
